package com.hiultra.archive.domain.vo;

import com.hiultra.common.constant.HttpStatus;
import com.hiultra.common.core.domain.AjaxResult;

/**
 * @Author: ls
 * @CreateTime: 2024/08/12  15:58
 * @Description: TODO
 * @Version: 1.0
 */
public class ResultEntity {
    private static final long serialVersionUID = 1L;


    /**
     * 状态码
     */
    private String code;

    /**
     * 返回信息
     */
    private String message;

    /**
     * 返回数据
     */
    private String data;

    public ResultEntity() {
    }

    public ResultEntity(String code, String message, String data) {
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        message = message;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        data = data;
    }

    public static ResultEntity success() {
        return new ResultEntity("00000", "操作成功", "");
    }

    public static ResultEntity success(String data) {
        return new ResultEntity("00000", "操作成功", data);
    }

    public static ResultEntity error(String message, String data) {
        return new ResultEntity("500", message, data);

    }

    public static ResultEntity error(String message) {
        return new ResultEntity("500", message, "");

    }

}
